package com.prs.crm.domain.sys;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.swing.border.Border;

import org.hibernate.annotations.Cascade;

import com.prs.crm.domain.Attachment;
import com.prs.crm.domain.BaseEntity;
import com.prs.crm.domain.doc.UploadDoc;
import com.prs.crm.domain.document.board.Board;
import com.prs.crm.domain.document.electron.Electron;
import com.prs.crm.domain.document.knowledge.Doc;
import com.prs.crm.domain.document.rule.Rule;
import com.prs.crm.domain.official.PersonalFile;

/***
 * 
 * @author Yanghao
 *	2012-7-31 13:50:41 文件类型维护
 */
@Entity
@Table(name="sys_filetypemaintain")
public class FileTypeMaintain extends BaseEntity{

	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private Integer id;
	private String name;
	private String remark;
	@ManyToOne(fetch=FetchType.LAZY)
	@Cascade({org.hibernate.annotations.CascadeType.ALL,org.hibernate.annotations.CascadeType.DELETE_ORPHAN})
	private Attachment attach;
	@OneToMany(mappedBy="fileTypeMaintain",cascade=CascadeType.ALL)
	private Set<Doc> doc;
	@OneToMany(mappedBy="fileTypeMaintain",cascade=CascadeType.ALL)
	private Set<UploadDoc> uploadDoc;
	@OneToMany(mappedBy="fileTypeMaintain",cascade=CascadeType.ALL)
	private Set<Rule> rule;
	@OneToMany(mappedBy="fileTypeMaintain",cascade=CascadeType.ALL)
	private Set<Electron> electron;
	@OneToMany(mappedBy="fileTypeMaintain",cascade=CascadeType.ALL)
	private Set<Board> board;
	@OneToMany(mappedBy="fileTypeMaintain",cascade=CascadeType.ALL)
	private Set<PersonalFile> personalFile;
	public Set<PersonalFile> getPersonalFile() {
		return personalFile;
	}
	public void setPersonalFile(Set<PersonalFile> personalFile) {
		this.personalFile = personalFile;
	}
	public Set<Electron> getElectron() {
		return electron;
	}
	public void setElectron(Set<Electron> electron) {
		this.electron = electron;
	}
	public Set<Board> getBoard() {
		return board;
	}
	public void setBoard(Set<Board> board) {
		this.board = board;
	}
	public Set<Rule> getRule() {
		return rule;
	}
	public void setRule(Set<Rule> rule) {
		this.rule = rule;
	}
	public Set<UploadDoc> getUploadDoc() {
		return uploadDoc;
	}
	public void setUploadDoc(Set<UploadDoc> uploadDoc) {
		this.uploadDoc = uploadDoc;
	}
	public Set<Doc> getDoc() {
		return doc;
	}
	public void setDoc(Set<Doc> doc) {
		this.doc = doc;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public Attachment getAttach() {
		return attach;
	}
	public void setAttach(Attachment attach) {
		this.attach = attach;
	}
}
